home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / t3script.arc / QUICKBBS.SLT < prev    next >
Encoding:
Text File  |  1990-04-14  |  3.2 KB  |  90 lines

  1. /////////////////////////////////////////////////////////////////////////
  2. //           QUICKBBS.SLT  -  by Terry Robertson (October 1988)        //
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
  4. //                                                                     //
  5. //    SCRIPT TO LOG-ON TO A QUICKBBS SYSTEM. It also deals with        //
  6. //    QBBS's BINKLEYTERM "front-end".                                  //
  7. //                                                                     //
  8. //    Please note that this script assumes that you have assigned your //
  9. //    FULL NAME to function key F4. The easiest way to do this is by   //
  10. //    using the FKEY script in this collection.                        //
  11. //                                                                     //
  12. //    In addition, the script is written so that it will abort if you  //
  13. //    have not completed the relevant PASSWORD entry in the Dialling   //
  14. //    Directory.                                                       //
  15. //                                                                     //
  16. //    I have assumed that you want to use the linked scripts CONNECT   //
  17. //    and CAPTURE. If you do not have these or prefer not to use       //
  18. //    them you should "comment out" the two lines starting "call"      //
  19. //    by simply putting "//" before the word "call".                   //
  20. //                                                                     //
  21. /////////////////////////////////////////////////////////////////////////
  22.  
  23.  
  24.  
  25. str s[30];
  26.  
  27.  
  28. main()
  29.  
  30. {
  31.  int stat;
  32.  int t1,
  33.      t2,
  34.      t3;
  35.  int tmark;
  36.  
  37.  alarm(1);
  38.  
  39.  call("connect", 1);                    // Gives "connect" information by
  40.                                         // calling Connect.slc script
  41.  call("capture", 1);                    // Opens new capture file by calling
  42.                                         // Capture.slc script
  43.  
  44.  if (not _entry_pass)                   // no pass, so didn't recog. board
  45.   {
  46.    prints ("Sorry, I don't know the password for this BBS!");
  47.    return;
  48.   }
  49.  
  50.  t1 = track("Binkley", 1);
  51.  t2 = track(" name?", 1);
  52.  t3 = track("Password", 1);
  53.  
  54.  tmark = timer_start(1800);             // wait up to 3 minutes for login
  55.  
  56.                                         // answer any logon questions
  57.  while (not time_up(tmark))
  58.   {
  59.    terminal();                          // let Telix process any chars and keys
  60.  
  61.    stat = track_hit(0);                 // see which (if any) track was hit
  62.  
  63.    if (stat == t1)                      // Escape prompt found
  64.     {
  65.      delay(50);
  66.      cputs("^[");                       // Send Escape character
  67.     }
  68.    else if (stat == t2)                 // send name
  69.     {
  70.      keyget(0x3e00, 0, s);
  71.      delchrs(s, strlen(s) - 2, strlen(s));
  72.      cputs(s);
  73.      cputs("^M");
  74.     }
  75.    else if (stat == t3)                 // send password
  76.     {
  77.      cputs(_entry_pass);
  78.      cputs("^M");
  79.      break;                             // done with logon
  80.     }
  81.   }
  82.  
  83.  if (time_up(1))
  84.   prints("Logon failed!");
  85.  
  86.  timer_free(tmark);                     // free timer channel
  87.  track_free(0);                         // and all track channels
  88.                
  89. }  
  90.